package gimys;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.BasicGameState;
import org.newdawn.slick.state.StateBasedGame;

public class EndScreen extends BasicGameState {

	private int ID;
	private Image background;
	
	public EndScreen(int menuState) throws SlickException {
		this.ID = menuState;
	}
	
	public int getID() {
		return this.ID;
	}

	@Override
	public void init(GameContainer container, StateBasedGame game) throws SlickException {
		this.background = new Image("data/End.png");
	}

	@Override
	public void render(GameContainer container, StateBasedGame game, Graphics g) throws SlickException {
		this.background.draw(0,0,GimysGame.displayHeight,GimysGame.displayWidth);
	}

	@Override
	public void update(GameContainer container, StateBasedGame game, int delta) throws SlickException {
		Input input = container.getInput();
		if(input.isKeyPressed(Input.KEY_SPACE))	{
			System.exit(0);
		}
	}

}
